<div class="panel_izquierdo">
    <h3><?php __('Opciones'); ?></h3>
    <ul>
    </ul>
</div>
<div class="contenido">
        <?php
    echo $form->create('OrdenInspeccion', array(
    'url' => array_merge(array('action' => ''), $this->params['pass']),
    'class'=> 'search'
    ));
    echo $form->input('empresa', array('div' => false));
    echo $form->submit('Buscar', array('div' => false));
    echo $this->Html->link('Limpiar',array('action' => ''));
    echo $form->end();
    echo "<br /><hr /><br /><br />"
    ?>
    <h2><?php __('Ordenes de Inspeccion');?></h2>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('#','correlativo');?></th>
            <th><?php echo $this->Paginator->sort('Mes','mes');?></th>
            <th><?php echo $this->Paginator->sort('Año','anio');?></th>
            <th><?php echo $this->Paginator->sort('Empresa','empresa');?></th>
            <th><?php echo $this->Paginator->sort('Fecha','fecha');?></th>
            <th><?php echo $this->Paginator->sort('Tipo','tipo_orden_inspeccion_id');?></th>
            <th class="actions"><?php __('Opciones');?></th>
        </tr>
        <?php

        $i = 0;
        foreach ($ordenInspeccions as $ordenInspeccion):
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
            ?>
        <tr<?php echo $class;?>>
            <td><?php echo $ordenInspeccion['OrdenInspeccion']['correlativo']; ?>&nbsp;</td>
            <td><?php echo $ordenInspeccion['OrdenInspeccion']['mes']; ?>&nbsp;</td>
            <td><?php echo $ordenInspeccion['OrdenInspeccion']['anio']; ?>&nbsp;</td>
            <td><?php echo $ordenInspeccion['OrdenInspeccion']['empresa']; ?>&nbsp;</td>
            <td><?php echo $time->format('d-m-Y',$ordenInspeccion['OrdenInspeccion']['fecha']); ?>&nbsp;</td>
            <td><?php echo $ordenInspeccion['TipoOrdenInspeccion']['title']; ?>            </td>
            <td class="actions">
                    <?php echo $this->Html->link(__('Mostrar', true), array('action' => 'view_produccion', $ordenInspeccion['OrdenInspeccion']['id'])); ?>
            </td>
        </tr>
        <?php endforeach; ?>
    </table>
    <p>
        <?php
        echo $this->Paginator->counter(array(
        'format' => __('Pagina %page% de %pages%, mostrando %current% registros de un total de %count%', true)
        ));
        ?>	</p>

    <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
        |
        <?php echo $this->Paginator->next(__('Siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
    </div>
</div>
